package com.cakin.javademo;

/**
 * @ClassName: CharacterTest3
 * @Description: 常用方法测试
 * @Date: 2020/6/15
 * @Author: cakin
 */
public class CharacterTest3 {
    /**
     * 功能描述：常用方法测试
     *
     * @author cakin
     * @date 2020/6/15
     * @param
     * @return
     * @description: 常用方法
     *  判断
     *  isLetter()：字母
     * 	isDigit()：数字
     * 	isWhitespace()：空白字符
     * 	isUpperCase()：大写
     *  isLowerCase()：小写
     *
     *  转换
     * 	toUpperCase()：转大写
     * 	toLowerCase()：转小写
     * 	toString()：转字符串
     *
     */
    public static void main(String[] args) {
        System.out.println(Character.isLetter('a'));
        System.out.println(Character.isLetter('4'));
        System.out.println("===================================");
        System.out.println(Character.isDigit('a'));
        System.out.println(Character.isDigit('4'));
        System.out.println("===================================");
        // 结论：Java中的空格包含：制表符，换行符 空格
        System.out.println(Character.isWhitespace('\t'));
        System.out.println(Character.isWhitespace('\n'));
        System.out.println(Character.isWhitespace(' '));
        System.out.println(Character.isWhitespace('a'));
        System.out.println("===================================");
        System.out.println(Character.isUpperCase('A'));
        System.out.println(Character.isUpperCase('a'));
        System.out.println(Character.isUpperCase('4'));
        System.out.println("===================================");
        System.out.println(Character.isLowerCase('A'));
        System.out.println(Character.isLowerCase('a'));
        System.out.println(Character.isLowerCase('6'));
        System.out.println("===================================");
        System.out.println(Character.toUpperCase('a'));
        System.out.println(Character.toUpperCase('A'));
        System.out.println(Character.toUpperCase('4'));
        System.out.println("===================================");
        System.out.println(Character.toLowerCase('a'));
        System.out.println(Character.toLowerCase('A'));
        System.out.println(Character.toLowerCase('4'));
        System.out.println("===================================");
        System.out.println(Character.toString('a'));
        System.out.println(Character.toString('4'));
        System.out.println(Character.toString(' '));


    }
}
